package beans;


import net.sf.json.JSONObject;

import java.io.Serializable;
import java.util.*;

public class AlgorithmDetail implements Serializable {

    private static final long serialVersionUID = 2812555972778664214L;
    private int id;
    private String name;
    private String introduction;
    private int inputCount;
    private int outputCount;
    private int paramsCount;
    private String version;
    private Category function;
    private String locationUri;

    public String getCompanyName() {
        return companyName;
    }

    private String companyName;
    private String postfix;
    private String platform;
    private boolean isContainGpu;
    private boolean isUseMpi;
    private String cpuNum;
    private float minCpuIdle;
    private float minRamRemaining;
    private boolean isDelete = false;
    private Category type;
    private String userId;
    private JSONObject companyJson;
    private boolean genetic;
    private String functionId;
    private String typeId;
    private List<AlgorithmInput> algorithmInputs = new ArrayList<>();
    private List<AlgorithmOutput> algorithmOutputs = new ArrayList<>();
    private List<AlgorithmParam> algorithmParams = new ArrayList<>();

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getFunctionId() {
        return functionId;
    }

    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }

    public boolean isGenetic() {
        return genetic;
    }

    public void setGenetic(boolean genetic) {
        this.genetic = genetic;
    }

    public JSONObject getCompanyJson() {
        return companyJson;
    }

    public void setCompanyJson(JSONObject companyJson) {
        this.companyJson = companyJson;
    }

    public String getCpuNum() {
        return cpuNum;
    }

    public void setCpuNum(String cpuNum) {
        this.cpuNum = cpuNum;
    }

    public AlgorithmDetail() {
    }


    public String getUserId() {
		return userId;
	}


	public void setUserId(String userId) {
		this.userId = userId;
	}


	public AlgorithmDetail(int id, String name, String introduction, int inputCount, int outputCount,
                           int paramsCount, String version, Category function, String locationUri,
                           String companyName, String postfix, String platform, boolean isContainGpu,
                           boolean isUseMpi, float minCpuIdle, float minRamRemaining,
                           List<AlgorithmInput> algorithmInputs, List<AlgorithmOutput> algorithmOutputs,
                           List<AlgorithmParam> algorithmParams, Boolean isDelete) {
        this.id = id;
        this.name = name;
        this.introduction = introduction;
        this.inputCount = inputCount;
        this.outputCount = outputCount;
        this.paramsCount = paramsCount;
        this.version = version;
        this.function = function;
        this.locationUri = locationUri;
        this.companyName = companyName;
        this.postfix = postfix;
        this.platform = platform;
        this.isContainGpu = isContainGpu;
        this.isUseMpi = isUseMpi;
        this.minCpuIdle = minCpuIdle;
        this.minRamRemaining = minRamRemaining;
        this.isDelete = isDelete;
        this.algorithmInputs = algorithmInputs;
        this.algorithmOutputs = algorithmOutputs;
        this.algorithmParams = algorithmParams;
    }

    @Override
    public String toString() {
        return "AlgorithmDetail{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", introduction='" + introduction + '\'' +
                ", inputCount=" + inputCount +
                ", outputCount=" + outputCount +
                ", paramsCount=" + paramsCount +
                ", version='" + version + '\'' +
                ", formatType='" + function + '\'' +
                ", locationUri='" + locationUri + '\'' +
                ", companyName='" + companyName + '\'' +
                ", postfix='" + postfix + '\'' +
                ", platform='" + platform + '\'' +
                ", isContainGpu=" + isContainGpu +
                ", isUseMpi=" + isUseMpi +
                ", minCpuIdle=" + minCpuIdle +
                ", minRamRemaining=" + minRamRemaining +
//                ", startScript='" + startScript + '\'' +
//                ", scriptType='" + scriptType + '\'' +
//                ", isComponent=" + isComponent +
                ", algorithmInputs=" + algorithmInputs +
                ", algorithmOutputs=" + algorithmOutputs +
                ", algorithmParams=" + algorithmParams +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public int getInputCount() {
        return inputCount;
    }

    public void setInputCount(int inputCount) {
        this.inputCount = inputCount;
    }

    public int getOutputCount() {
        return outputCount;
    }

    public void setOutputCount(int outputCount) {
        this.outputCount = outputCount;
    }

    public int getParamsCount() {
        return paramsCount;
    }

    public void setParamsCount(int paramsCount) {
        this.paramsCount = paramsCount;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Category getFunction() {
        return function;
    }

    public void setFunction(Category function) {
        this.function = function;
    }

    public String getLocationUri() {
        return locationUri;
    }

    public void setLocationUri(String locationUri) {
        this.locationUri = locationUri;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getPostfix() {
        return postfix;
    }

    public void setPostfix(String postfix) {
        this.postfix = postfix;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public boolean isContainGpu() {
        return isContainGpu;
    }

    public void setContainGpu(boolean containGpu) {
        isContainGpu = containGpu;
    }

    public boolean isUseMpi() {
        return isUseMpi;
    }

    public void setUseMpi(boolean useMpi) {
        isUseMpi = useMpi;
    }

    public float getMinCpuIdle() {
        return minCpuIdle;
    }

    public void setMinCpuIdle(float minCpuIdle) {
        this.minCpuIdle = minCpuIdle;
    }

    public float getMinRamRemaining() {
        return minRamRemaining;
    }

    public void setMinRamRemaining(float minRamRemaining) {
        this.minRamRemaining = minRamRemaining;
    }

    public List<AlgorithmInput> getAlgorithmInputs() {
        return algorithmInputs;
    }

    public void setAlgorithmInputs(List<AlgorithmInput> algorithmInputs) {
        this.algorithmInputs = algorithmInputs;
    }

    public List<AlgorithmOutput> getAlgorithmOutputs() {
        return algorithmOutputs;
    }

    public void setAlgorithmOutputs(List<AlgorithmOutput> algorithmOutputs) {
        this.algorithmOutputs = algorithmOutputs;
    }

    public List<AlgorithmParam> getAlgorithmParams() {
        return algorithmParams;
    }

    public void setAlgorithmParams(List<AlgorithmParam> algorithmParams) {
        this.algorithmParams = algorithmParams;
    }

    public boolean isDelete() {
        return isDelete;
    }

    public void setDelete(boolean delete) {
        isDelete = delete;
    }


	public Category getType() {
		return type;
	}


	public void setType(Category type) {
		this.type = type;
	}
    
}
